package com.mall.dao;

import com.mall.pojo.Product;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface ProductMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Product record);

    int insertSelective(Product record);

    Product selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Product record);

    int updateByPrimaryKey(Product record);

    List<Product> selectByCategoryIdSet(@Param(value = "categoryIdSet") Set<Integer> categoryIdSet);

    Product selectByProductId(@Param(value = "productId") Integer productId);

    List<Product> selectByProductIds(@Param(value = "productIds") List<Integer> productIds);

    int updateStock(Integer productId,Integer quantity);

    List<Product> selectByProductIdSet(@Param(value = "productIdSet") Set<Integer> productIdSet);
}